package com.example.elm_server_api.domain;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

import lombok.Data;
import lombok.ToString;

/**
 * 商铺信息表
 * @TableName shop_info
 */
@Data
@ToString
public class ShopInfo implements Serializable {
    /**
     * 主键
     */
    private Integer id;

    /**
     * 商店ID
     */
    private Integer shopId;

    /**
     * 商品名称
     */
    private String shopname;

    /**
     * 联系人
     */
    private String contactMan;

    /**
     * 联系电话
     */
    private String contactMobile;

    /**
     * 门店类型
     */
    private Integer cateid;

    /**
     * 营业开始时间
     */
    private Date beginTime;

    /**
     * 营业结束时间
     */
    private Date endTime;

    /**
     * 门店图片
     */
    private String storeImg;

    /**
     * 店内图片
     */
    private String instoreImg;

    /**
     * logo图片
     */
    private String logoImg;

    /**
     * 省
     */
    private String province;

    /**
     * 市
     */
    private String city;

    /**
     * 区
     */
    private String district;

    /**
     * 详细地址
     */
    private String address;

    /**
     * 街道/门牌号
     */
    private String street;

    /**
     * 外卖电话
     */
    private String mobile;

    /**
     * 邮箱
     */
    private String email;

    /**
     * 其他图片
     */
    private String images;

    /**
     * 商家公告
     */
    private String notice;

    /**
     * 平均评分
     */
    private Double score;

    /**
     * 餐盒费用
     */
    private Integer boxCost;

    /**
     * 配送费用
     */
    private Integer sendCost;

    /**
     * 起送消费
     */
    private Integer floorSendCost;

    private List<Food> foods = new ArrayList<>();


    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        ShopInfo other = (ShopInfo) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getShopId() == null ? other.getShopId() == null : this.getShopId().equals(other.getShopId()))
            && (this.getShopname() == null ? other.getShopname() == null : this.getShopname().equals(other.getShopname()))
            && (this.getContactMan() == null ? other.getContactMan() == null : this.getContactMan().equals(other.getContactMan()))
            && (this.getContactMobile() == null ? other.getContactMobile() == null : this.getContactMobile().equals(other.getContactMobile()))
            && (this.getCateid() == null ? other.getCateid() == null : this.getCateid().equals(other.getCateid()))
            && (this.getBeginTime() == null ? other.getBeginTime() == null : this.getBeginTime().equals(other.getBeginTime()))
            && (this.getEndTime() == null ? other.getEndTime() == null : this.getEndTime().equals(other.getEndTime()))
            && (this.getStoreImg() == null ? other.getStoreImg() == null : this.getStoreImg().equals(other.getStoreImg()))
            && (this.getInstoreImg() == null ? other.getInstoreImg() == null : this.getInstoreImg().equals(other.getInstoreImg()))
            && (this.getLogoImg() == null ? other.getLogoImg() == null : this.getLogoImg().equals(other.getLogoImg()))
            && (this.getProvince() == null ? other.getProvince() == null : this.getProvince().equals(other.getProvince()))
            && (this.getCity() == null ? other.getCity() == null : this.getCity().equals(other.getCity()))
            && (this.getDistrict() == null ? other.getDistrict() == null : this.getDistrict().equals(other.getDistrict()))
            && (this.getAddress() == null ? other.getAddress() == null : this.getAddress().equals(other.getAddress()))
            && (this.getStreet() == null ? other.getStreet() == null : this.getStreet().equals(other.getStreet()))
            && (this.getMobile() == null ? other.getMobile() == null : this.getMobile().equals(other.getMobile()))
            && (this.getEmail() == null ? other.getEmail() == null : this.getEmail().equals(other.getEmail()))
            && (this.getImages() == null ? other.getImages() == null : this.getImages().equals(other.getImages()))
            && (this.getNotice() == null ? other.getNotice() == null : this.getNotice().equals(other.getNotice()))
            && (this.getScore() == null ? other.getScore() == null : this.getScore().equals(other.getScore()))
            && (this.getBoxCost() == null ? other.getBoxCost() == null : this.getBoxCost().equals(other.getBoxCost()))
            && (this.getSendCost() == null ? other.getSendCost() == null : this.getSendCost().equals(other.getSendCost()))
            && (this.getFloorSendCost() == null ? other.getFloorSendCost() == null : this.getFloorSendCost().equals(other.getFloorSendCost()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getShopId() == null) ? 0 : getShopId().hashCode());
        result = prime * result + ((getShopname() == null) ? 0 : getShopname().hashCode());
        result = prime * result + ((getContactMan() == null) ? 0 : getContactMan().hashCode());
        result = prime * result + ((getContactMobile() == null) ? 0 : getContactMobile().hashCode());
        result = prime * result + ((getCateid() == null) ? 0 : getCateid().hashCode());
        result = prime * result + ((getBeginTime() == null) ? 0 : getBeginTime().hashCode());
        result = prime * result + ((getEndTime() == null) ? 0 : getEndTime().hashCode());
        result = prime * result + ((getStoreImg() == null) ? 0 : getStoreImg().hashCode());
        result = prime * result + ((getInstoreImg() == null) ? 0 : getInstoreImg().hashCode());
        result = prime * result + ((getLogoImg() == null) ? 0 : getLogoImg().hashCode());
        result = prime * result + ((getProvince() == null) ? 0 : getProvince().hashCode());
        result = prime * result + ((getCity() == null) ? 0 : getCity().hashCode());
        result = prime * result + ((getDistrict() == null) ? 0 : getDistrict().hashCode());
        result = prime * result + ((getAddress() == null) ? 0 : getAddress().hashCode());
        result = prime * result + ((getStreet() == null) ? 0 : getStreet().hashCode());
        result = prime * result + ((getMobile() == null) ? 0 : getMobile().hashCode());
        result = prime * result + ((getEmail() == null) ? 0 : getEmail().hashCode());
        result = prime * result + ((getImages() == null) ? 0 : getImages().hashCode());
        result = prime * result + ((getNotice() == null) ? 0 : getNotice().hashCode());
        result = prime * result + ((getScore() == null) ? 0 : getScore().hashCode());
        result = prime * result + ((getBoxCost() == null) ? 0 : getBoxCost().hashCode());
        result = prime * result + ((getSendCost() == null) ? 0 : getSendCost().hashCode());
        result = prime * result + ((getFloorSendCost() == null) ? 0 : getFloorSendCost().hashCode());
        return result;
    }


}